const {mongoose} = require('../mongoose/conectDB')

const Schema = mongoose.Schema;

const HOME_SHCEMA = Schema({
   dataUrl: Array,
   name: String,
   id: String
})
const HOME_DATA = mongoose.model('homedatas',HOME_SHCEMA)

// 
const IPHOMES_SCHEMA = Schema({
    imgWrap: Array,
    src: String,
    iphomeNames: String,
    brand: String,
    fuselageCapacity: Array,
    describe: String,
    price: Number,
    id: String,
    checked: Number,
    sort: Number
})
const IPHOMES_MODEL = mongoose.model('iphones', IPHOMES_SCHEMA)

//  
const IPHONE_DETAILS = Schema({
    iphome: Array,
    id: Object,
    select: Boolean
})
const IPHONE_DETAILS_MODEL = mongoose.model('phonetinfos', IPHONE_DETAILS)


// 
const INTELLIGENT_SCHEMA = Schema({
    imgWrap: Array,
    src: String,
    listName: String,
    brand: String,
    describe: String,
    price: {
        type: Number,
    },
    id: String,
    checked: Number,
    sort: Number
})
const INTELLIGENT_MODEL =  mongoose.model('intelligentdevices', INTELLIGENT_SCHEMA)

const GAMEDEVICES_MODEL =  mongoose.model('gamedevices', INTELLIGENT_SCHEMA)

const ELECTRONICS_MODEL =  mongoose.model('electronics', INTELLIGENT_SCHEMA)

const POWEACCESSORES_MODEL =  mongoose.model('poweraccessories', INTELLIGENT_SCHEMA)

const MOBILESTORAGES_MODEL =  mongoose.model('mobilestorages', INTELLIGENT_SCHEMA)

const CIRCUMS_MODEL =  mongoose.model('circums', INTELLIGENT_SCHEMA)

exports.HOME_DATA = HOME_DATA
exports.IPHOMES_MODEL = IPHOMES_MODEL
exports.IPHONE_DETAILS_MODEL = IPHONE_DETAILS_MODEL
exports.INTELLIGENT_MODEL = INTELLIGENT_MODEL
exports.GAMEDEVICES_MODEL = GAMEDEVICES_MODEL
exports.ELECTRONICS_MODEL = ELECTRONICS_MODEL
exports.POWEACCESSORES_MODEL = POWEACCESSORES_MODEL
exports.MOBILESTORAGES_MODEL = MOBILESTORAGES_MODEL
exports.CIRCUMS_MODEL = CIRCUMS_MODEL